const apiFiles = require.context('./modules', false, /\.js$/);

const api = apiFiles.keys().reduce((modules, modulePath) => {
  const value = apiFiles(modulePath);
  modules = {
    ...modules,
    ...value.default
  };
  return modules;
}, {});
export default api;
